package com.eclink.asset.workflow.controller;

import com.eclink.asset.asset.domain.dao.FlowApply;
import com.eclink.asset.asset.domain.query.AssetApplySaveQuery;
import com.eclink.asset.domain.dto.FlowApplyDetailDTO;
import com.eclink.asset.pojo.query.ApplyQuery;
import com.eclink.asset.workflow.domain.dao.FlowTask;
import com.eclink.asset.workflow.service.ApplyService;
import com.eclink.asset.workflow.service.FlowService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.utils.SecurityUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 申请接口
 *
 * @author zcc
 * @date 2024-06-04
 */
@Api(tags ="申请接口")
@RestController
@RequestMapping("/flow")
public class FlowController extends BaseController {

    @Resource
    private FlowService flowService;

    @ApiOperation("查询任务列表")
    @GetMapping("/task/{id}")
    public ResponseEntity<List<FlowTask>> taskList(@PathVariable String id) {
        List<FlowTask> list = flowService.getTaskList(id);
        return ResponseEntity.ok(list);
    }


}
